<template>
<div>
  <Drawer width="500"  title="备案详细信息" :closable="false" v-model="drawerInfo">
    <Card class="detail_card">
      <p slot="title">驾驶员信息</p>
      <Row>
        <Col offset="2" span="12">驾驶员姓名:</Col>
        <Col span="10">{{carInfo.driver_name}}</Col>
      </Row>
      <Row>
        <Col offset="2" span="12">驾驶员身份证号:</Col>
        <Col span="10">{{carInfo.driver_cardno}}</Col>
      </Row>
      <Row>
        <Col offset="2" span="12">驾驶员联系方式:</Col>
        <Col span="10">{{carInfo.driver_tel}}</Col>
      </Row>
<!--      <Row>-->
<!--        <Col offset="2" span="12">健康证明:</Col>-->
<!--        <Col span="10" v-if="carInfo.worker_jkzm === '1'">有</Col>-->
<!--        <Col span="10" v-if="carInfo.worker_jkzm !== '1'">无</Col>-->
<!--      </Row>-->
      <Row>
        <Col offset="2" span="12">车牌号:</Col>
        <Col span="10">{{carInfo.car_number}}</Col>
      </Row>
      <Row>
        <Col offset="2" span="12">车牌颜色:</Col>
        <Col span="10">
          <span v-for="(item,index) in projectListArr" :key="index">
          <p v-show="item.value === carInfo.chepai_color "> {{item.lable}}</p>
          </span>
        </Col>
      </Row>
<!--      <Row>-->
<!--        <Col offset="2" span="12">车体颜色:</Col>-->
<!--        <Col span="10">{{carInfo.car_color}}</Col>-->
<!--      </Row>-->
      <Row>
        <Col offset="2" span="12">备案时间:</Col>
        <Col span="10">{{carInfo.create_time}}</Col>
      </Row>
      <Row>
        <Col offset="2" span="12">备案类型:</Col>
        <Col span="10">
          <span v-if="carInfo.arrive_type_one === '1'">出锦</span>
          <span v-if="carInfo.arrive_type_one === '2'">入锦</span>
        </Col>
      </Row>
      <Row v-show="carInfo.arrive_type_one === '2'">
        <Col offset="2" span="12">入锦类型:</Col>
        <Col span="10">
          <span v-show="carInfo.arrive_type_two === '1'">返锦</span>
          <span v-show="carInfo.arrive_type_two === '2'">来锦</span>
        </Col>
      </Row>
<!--      <Row>-->
<!--        <Col offset="2" span="12">道路运输证号:</Col>-->
<!--        <Col span="10">{{carInfo.dlys_no}}</Col>-->
<!--      </Row>-->
<!--      <Row>-->
<!--        <Col offset="2" span="12">是否冷链:</Col>-->
<!--        <Col span="10">-->
<!--          <span v-show="carInfo.car_is_ll === '1'">是</span>-->
<!--          <span v-show="carInfo.car_is_ll === '2'">否</span>-->
<!--        </Col>-->
<!--      </Row>-->
<!--      <Row>-->
<!--        <Col offset="2" span="12">从业资格证号:</Col>-->
<!--        <Col span="10">{{carInfo.people_cy_no}}</Col>-->
<!--      </Row>-->
      <Row v-show="carInfo.arrive_type_one === '2'">
        <Row v-show="carInfo.arrive_type_one === '2'">
          <Col offset="2" span="12">在锦时间:</Col>
          <Col span="10">
            <span v-show="carInfo.zssj === '1'">当天离锦</span>
            <span v-show="carInfo.zssj === '2'">在锦过夜</span>
          </Col>
        </Row>
        <Row v-show="carInfo.zssj === '2'">
          <Col offset="2" span="12">来返锦住址:</Col>
          <Col span="10">{{carInfo.arrive_address }}</Col>
        </Row>
      </Row>
      <Row v-show="carInfo.arrive_type_one === '1'">
        <Col offset="2" span="12">离锦时间:</Col>
        <Col span="10">{{carInfo.arrive_time}}</Col>
      </Row>
      <Row v-show="carInfo.arrive_type_one === '2'">
        <Col offset="2" span="12">来锦时间:</Col>
        <Col span="10">{{carInfo.arrive_time}}</Col>
      </Row>
<!--      <Row v-show="carInfo.arrive_type_one === '2'">-->
<!--        <Col offset="2" span="12">途经地:</Col>-->
<!--        <Col span="10">{{carInfo.tjd }}</Col>-->
<!--      </Row>-->
      <Row v-show="carInfo.arrive_type_one === '2'">
        <Col offset="2" span="12">到锦区:</Col>
        <Col span="10" >{{getName(carInfo.qh_json)}}</Col>
      </Row>
      <Row>
        <Col offset="2" span="12">社区处置:</Col>
        <Col span="10">
          <span v-show="carInfo.community_type">已处置</span>
          <span v-show="!carInfo.community_type">未处置</span>
        </Col>
      </Row>
      <Row>
        <Col offset="2" span="12">社区处置类型:</Col>
        <Col span="10">
          <span v-show="carInfo.community_type && carInfo.community_type== 1">居家健康监测</span>
          <span v-show="carInfo.community_type && carInfo.community_type== 2">离锦</span>
          <span v-show="carInfo.community_type && carInfo.community_type== 3">其他</span>
        </Col>
      </Row>
      <Row>
        <Col offset="2" span="12">社区处置内容:</Col>
        <Col span="10">
          <span v-show="carInfo.community_cz">{{carInfo.community_cz}}</span>
        </Col>
      </Row>
      <!-- <Row>
        <Col offset="2" span="12">是否去过高风险地区:</Col>
        <Col span="10">
          <span v-show="carInfo.quguo_high_risk === '1'">未途经</span>
          <span v-show="carInfo.quguo_high_risk === '2'">途经</span>
          <span v-show="carInfo.quguo_high_risk === '3'">未查询到</span>
        </Col>
      </Row> -->
      <Row>
        <Col offset="2" span="12">核酸结果:</Col>
        <Col span="10">{{carInfo.hesuan_result}}</Col>
      </Row>
    </Card>
    <Card class="detail_card">
      <p slot="title">同行人信息</p>
      <Table border :columns="cargoTransportationPeoplePeerColumns" :data="carInfo.cargoTransportationPeoplePeer"></Table>
    </Card>
<!--    <Card class="detail_card">-->
<!--      <p slot="title">货主信息</p>-->
<!--      <div v-for="(item,index) in carInfo.cargoTransportationGoods" :key="index+'i'">-->
<!--        <Row >-->
<!--          &lt;!&ndash; <Col span="12">-->
<!--            物品名称: {{item.goods_name}}-->
<!--          </Col> &ndash;&gt;-->
<!--          <Col span="12" v-if="item.goods_pretend">-->
<!--            物品装货地: {{item.goods_pretend_s + item.goods_pretend}}-->
<!--          </Col>-->
<!--          &lt;!&ndash; <Col span="12">-->
<!--            物品卸货时间: {{item.goods_discharge_time}}-->
<!--          </Col> &ndash;&gt;-->
<!--          <Col span="12" v-if="item.goods_discharge">-->
<!--            物品卸货地: {{item.goods_discharge}}-->
<!--          </Col>-->
<!--          <Col span="12" v-if="item.receiving_dw">-->
<!--            收发货人单位: {{item.receiving_dw}}-->
<!--          </Col>-->
<!--          <Col span="12" v-if="item.receiving_name">-->
<!--            收发货人姓名: {{item.receiving_name}}-->
<!--          </Col>-->
<!--          <Col span="12" v-if="item.receiving_tel">-->
<!--            收发货人电话: {{item.receiving_tel}}-->
<!--          </Col>-->
<!--        </Row>-->
<!--      </div>-->
<!--    </Card>-->
    <Card class="detail_card" v-show="carInfo.car_is_ll === '1'">
      <p slot="title">冷链信息</p>
      <p :style="pStyle">进出口清单</p>
      <div class="img_list">
        <div v-for="(item,index) in carInfo.cargoTransportationGoodsColdChain" :key="index + 'o'"><img :src="item.jck_qd" alt="" preview="5"></div>
      </div>
      <Divider />
      <p :style="pStyle">进出口检疫检验证明</p>
      <div class="img_list">
        <div v-for="(item,index) in carInfo.cargoTransportationGoodsColdChain" :key="index + 'p'"><img :src="item.jck_jyzm" alt="" preview="6"></div>
      </div>
      <Divider />
      <p :style="pStyle">核酸检测证明</p>
      <div class="img_list">
        <div v-for="(item,index) in carInfo.cargoTransportationGoodsColdChain" :key="index + 'l'"><img :src="item.hs_zm" alt="" preview="7"></div>
      </div>
      <Divider />
      <p :style="pStyle">消杀证明</p>
      <div class="img_list">
        <div v-for="(item,index) in carInfo.cargoTransportationGoodsColdChain" :key="index + 'k'"><img :src="item.xs_zm" alt="" preview="8"></div>
      </div>
    </Card>
    <!-- <Card class="detail_card">
      <p slot="title">工作者处置信息</p>
      <Row>
        <Col offset="2" span="12">公安处置状态:</Col>
        <Col span="10">
          <span v-show="!carInfo.worker_ga">未处置</span>
          <span v-show="carInfo.worker_ga">已处置</span>
        </Col>
      </Row>
      <Row>
        <Col offset="2" span="12">交通处置状态:</Col>
        <Col span="10">
          <span v-show="!carInfo.worker_jt">未处置</span>
          <span v-show="carInfo.worker_jt">已处置</span>
        </Col>
      </Row>
      <Row>
        <Col offset="2" span="12">卫建处置状态:</Col>
        <Col span="10">
          <span v-show="!carInfo.worker_wj">未处置</span>
          <span v-show="carInfo.worker_wj">已处置</span>
        </Col>
      </Row>
      <Row v-show="carInfo.worker_wj">
        <Col offset="2" span="12">卫建处置方式:</Col>
        <Col span="10">
          <span v-show="carInfo.worker_czfs === '1'">放行</span>
          <span v-show="carInfo.worker_czfs === '2'">劝返</span>
          <span v-show="carInfo.worker_czfs === '3'">隔离</span>
        </Col>
      </Row>
      <Row v-show="carInfo.worker_czfs === '2'">
        <Col offset="2" span="12">劝返原因:</Col>
        <Col span="10">
          {{carInfo.worker_reason}}
        </Col>
      </Row>
      <Row v-show="carInfo.worker_czfs === '3'">
        <Col offset="2" span="12">隔离方式:</Col>
        <Col span="10">
          <span v-show="carInfo.worker_glfs  === '0'">居家隔离</span>
          <span v-show="carInfo.worker_glfs === '1'">集中隔离</span>
        </Col>
      </Row>
      <Row v-show="carInfo.worker_czfs === '3' && carInfo.worker_glfs  === '0'">
        <Col offset="2" span="12">居家隔离家属姓名:</Col>
        <Col span="10">
          {{carInfo.worker_jsxm}}
        </Col>
      </Row>
      <Row v-show="carInfo.worker_czfs === '3' && carInfo.worker_glfs  === '0'">
        <Col offset="2" span="12">居家隔离家属电话:</Col>
        <Col span="10">
          {{carInfo.worker_jsdh}}
        </Col>
      </Row>
      <Row v-show="carInfo.worker_czfs === '3' && carInfo.worker_glfs  === '1'">
        <Col offset="2" span="12">集中隔离原因:</Col>
        <Col span="10">
          <span v-show="carInfo.worker_jzglyy  === '0'">重点管控区</span>
          <span v-show="carInfo.worker_jzglyy === '1'">无法居家隔离</span>
        </Col>
      </Row>
      <Row v-show="carInfo.worker_czfs === '3' && carInfo.worker_glfs  === '1'">
        <Col offset="2" span="12">送达体温:</Col>
        <Col span="10">
          {{carInfo.worker_tw}}
        </Col>
      </Row>
    </Card> -->
  </Drawer>
</div>
</template>

<script>

export default {
  name: 'index',
  data () {
    return {
      projectListArr: [
        {
          value: '1',
          lable: '蓝色'
        },
        {
          value: '2',
          lable: '黄色'
        },
        {
          value: '3',
          lable: '黑色'
        },
        {
          value: '4',
          lable: '白色'
        },
        {
          value: '5',
          lable: '绿色'
        },
        {
          value: '9',
          lable: '其他'
        }
      ],
      columns: [
        {
          'code': 'LM00001',
          'name': '市辖区'
        },
        {
          'code': 'LM00002',
          'name': '古塔区'
        },
        {
          'code': 'LM00003',
          'name': '凌河区'
        },
        {
          'code': 'LM00004',
          'name': '太和区'
        },
        {
          'code': 'LM00005',
          'name': '黑山县'
        },
        {
          'code': 'LM00006',
          'name': '义县'
        },
        {
          'code': 'LM00007',
          'name': '凌海市'
        },
        {
          'code': 'LM00008',
          'name': '北镇市'
        }
      ],
      drawerInfo: false,
      carInfo: {},
      pStyle: {
        fontSize: '16px',
        color: 'rgba(0,0,0,0.85)',
        lineHeight: '24px',
        display: 'block',
        marginBottom: '16px'
      },
      cargoTransportationPeoplePeerColumns: [
        {
          title: '序号',
          type: 'index',
          width: 50
        },
        {
          title: '同行人姓名',
          key: 'passenger_name',
          align: 'center'
        },
        {
          title: '同行人身份证号',
          key: 'passenger_cardno',
          align: 'center'
        },
        {
          title: '同行人联系方式',
          key: 'passenger_tel',
          align: 'center'
        }
        // {
        //   title: '同行人核酸结果',
        //   key: 'hesuan_result',
        //   align: 'center'
        // },
        // {
        //   title: '同行人核酸详情',
        //   key: 'hesuan_detail',
        //   align: 'center'
        // },
        // {
        //   title: '同行人是否去过高风险地区',
        //   slot: 'quguo_high_risk',
        //   align: 'center'
        // }
      ]
    }
  },
  methods: {
    init (e) {
      this.carInfo = e
      this.drawerInfo = true
    },
    getName (v) {
      if (!v) return
      let val = JSON.parse(v)
      console.log()
      return val.qu_name + '/' + val.street_name + '/' + val.community_name
    }
  }
}
</script>
<style scoped>
.detail_card {
margin-bottom: 2%;
}
.img_list{
  margin: 20px 0.853rem;
  display: flex;
}
.img_list img{
  width: 120px;
  height: 120px;
  margin-right: 20px;
}
</style>
